package priv.stones.multi_thread.runnable;

/**
 * @Author: Stones
 * @Description:
 * @Date: 2017/9/20 16:00
 */
public class Main1 {
    public static void main(String[] args) {
//        Runnable1 runnable1 = new Runnable1("str1");
//        Runnable1 runnable2 = new Runnable1("str2");
//        Runnable1 runnable3 = new Runnable1("str3");
//        Thread thread1 = new Thread(runnable1);
//        Thread thread2 = new Thread(runnable2);
//        Thread thread3 = new Thread(runnable3);
//        thread1.start();
//        thread2.start();
//        thread3.start();

        Runnable1 mythread = new Runnable1("my");
        new Thread(mythread,"thread1").start();
        new Thread(mythread,"thread2").start();
        new Thread(mythread,"thread3").start();

//        new Thread(new Runnable() {
//            public void run() {
//                for (int i = 0; i < 10; i++) {
//                    System.out.println(" run----------" + i);
//                }
//            }
//        }).start();

//        new Thread(()->{
//            for (int i = 0; i < 10; i++) {
//                System.out.println(" run----------" + i);
//            }
//        }).start();

    }
}
